package week_8.实验二_树;

import week_6.practice.PostfixEvaluator;

public class InfixToPostfixTreeTest {
    public static void main(String[] args) {
        InfixToPostfixTree tree = new InfixToPostfixTree();
        String a = "1 + ( 2 + 3 ) * 4 - 5";
        String B = tree.convert(a);
        System.out.println(B);
        PostfixEvaluator postfixEvaluator = new PostfixEvaluator();
        System.out.println("后缀表达式求值得：" + postfixEvaluator.evaluate(B));
    }
}
